package 补充.多线程;

import java.text.SimpleDateFormat;
import java.util.Date;

public class 线程休眠 {
    public static void main(String[] args) throws InterruptedException {
        for (int i = 0; i < 10; i++) {
            System.out.println("当前时间:"+new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
            Thread.sleep(2000);
        }
    }
}
